import { type RouteConfig, index, layout, prefix, route } from "@react-router/dev/routes";

export default [

    route("login", "./routes/login.tsx"),
    route("logout", "./routes/logout.tsx"),

    layout("layout/layout.tsx", [
        index("routes/home.tsx"),

        // route("automation", "./some/file.tsx"),
        route("auto", "routes/auto.tsx"),
           
        route("zigbee", "routes/zigbee.tsx"),
        route("wifi", "routes/wifi.tsx"),

        // route("converters/:converterId/device", "routes/converters/device.tsx"),

        route("nodes/:nodeId", "routes/node.tsx"),

        ...prefix("locations", [
            route(":locationId", "routes/location.tsx"),
            route(":locationId/edit", "routes/location/edit.tsx"),
            route(":locationId/destroy", "routes/location/delete.tsx"),
            route("create", "routes/location/create.tsx"),
        ]),



        route("devices/:id/edit", "routes/device/edit.tsx"),
        route("devices/:id/destroy", "routes/device/delete.tsx"),

        route("devices/serial/create", "routes/device/serial.tsx"),
        route("devices/converter/create", "routes/device/converter.tsx"),
        route("devices/wifi/create", "routes/device/wifi.tsx"),
        route("devices/zigbee/create", "routes/device/zigbee.tsx"),

        route("commands/create", "routes/device/command.tsx"),



    ]),



] satisfies RouteConfig;
